<template>
  <div class="modal bg-slate-500 flex items-center justify-center left-0 top-0">
    <div class="box bg-white flex flex-col items-center border-10 p-2.5 text-black">
      <div class="text mb-4">{{ msg }}</div>
      <button @click="emit('click')">确定</button>
    </div>
  </div>
</template>
<script setup lang="ts">
const emit = defineEmits(['click'])
defineProps({
  msg: {
    type: String,
    default: '',
    required: true
  }
})
</script>
<style scoped lang="scss">
  .modal {
    position: fixed;
    width: 100%;
    height: 100%;

    .box{
      min-width: 30%;
      box-shadow: 0 0 3px #00000080;   
    }
  }
</style>